<template>
  <div class="right-1">
    <div v-for="(v, i) in newarr" :key="i">
      <h3>{{v.title }}</h3>
      <!-- <p>{{v.data.id}}</p> -->
      <ul>
        <li v-for="(v, i) in v.data" :key="i" @click="list(v.id)">
          <img class="img" :src="v.img" alt="" />
          <p>{{ v.title1 }}</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: ["newarr"],
  methods: {
    list(val){
      // console.log(val)
      //name的地址要与路由里面的地址一致,路由大写他也大写
      this.$router.push({name:'List',params:{xiaoyu:val}})
    }
  },
  mounted() {
    
  },
};
</script>

<style scoped>
.right-1 {
  margin: 0.1rem 0;
  width: 100%;
  background: #ffffff;
  border-radius: 0.1rem;
}
.right-1 h3 {
  padding: 0.10rem 0.15rem;
}
ul {
  display: flex;
  flex-wrap: wrap;
}
li {
  width: 33.333%;
}
ul p {
  text-align: center;
  padding: 0.15rem 0;
  color: #898989;
}
.img {
  text-align: center;
  width: 0.76rem;
  height: 0.76rem;
  margin-left: 0.08rem;
}
</style>